package com.masterclient.app.businessmodule.vipmodule.persenter;


import com.eoner.baselib.container.CommonBaseResponse;
import com.eoner.baselib.presenter.FCBaseCallBack;
import com.masterclient.app.businessmodule.vipmodule.api.VipCenterService;
import com.masterclient.app.businessmodule.vipmodule.bean.Member;

public class VipCenterPresenter extends VipCenterContract.Presenter {


    @Override
    public void getVipData() {
        //mView.baseShowPageLoading(false);
        mRxManager.add(toNewSubscribe(VipCenterService.getInstance().getVipData(), new FCBaseCallBack<CommonBaseResponse<Member>>() {
            @Override
            public void onSuccess(CommonBaseResponse<Member> bean) {
                mView.vipData(bean.getData());
            }

            @Override
            public void onNetWorkError(String errorMsg) {
                super.onNetWorkError(errorMsg);
                mView.vipData(null);
            }

            @Override
            public void onServiceError(CommonBaseResponse<Member> obj) {
                super.onServiceError(obj);
                mView.vipData(null);
            }
        }));
    }
}
